import { useParams, useSearchParams, useLocation } from "react-router-dom";
export default function GoodsInfo(props) {
  // 获取参数方式1
  const params = useParams();
  // 获取参数方式2
  const location = useLocation();
  const [searchParams, setSearchParams] = useSearchParams();
  console.log(params, searchParams, props, location);
  return <div>商品详情 {params.id}</div>;
}
